/**
 * 2017年12月21日
 */
package exp.util;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Locale;


/**
 * @author Alex
 *
 */
public class Printer {
	String dir = "D:\\wekadataset\\timeseries\\result";
	PrintWriter printer;
	public Printer(String name) throws IOException{
		File f = new File(dir,name+".txt");
		printer = new PrintWriter(new FileWriter(f));
		
	}
	/**
	 * @param b
	 * @see java.io.PrintWriter#print(boolean)
	 */
	public void print(boolean b) {
		printer.print(b);
	}

	/**
	 * @param c
	 * @see java.io.PrintWriter#print(char)
	 */
	public void print(char c) {
		printer.print(c);
	}

	/**
	 * @param i
	 * @see java.io.PrintWriter#print(int)
	 */
	public void print(int i) {
		printer.print(i);
	}

	/**
	 * @param l
	 * @see java.io.PrintWriter#print(long)
	 */
	public void print(long l) {
		printer.print(l);
	}

	/**
	 * @param f
	 * @see java.io.PrintWriter#print(float)
	 */
	public void print(float f) {
		printer.print(f);
	}

	/**
	 * @param d
	 * @see java.io.PrintWriter#print(double)
	 */
	public void print(double d) {
		printer.print(d);
	}

	/**
	 * @param s
	 * @see java.io.PrintWriter#print(char[])
	 */
	public void print(char[] s) {
		printer.print(s);
	}

	/**
	 * @param s
	 * @see java.io.PrintWriter#print(java.lang.String)
	 */
	public void print(String s) {
		printer.print(s);
	}

	/**
	 * @param obj
	 * @see java.io.PrintWriter#print(java.lang.Object)
	 */
	public void print(Object obj) {
		printer.print(obj);
	}

	/**
	 * 
	 * @see java.io.PrintWriter#println()
	 */
	public void println() {
		printer.println();
	}

	/**
	 * @param x
	 * @see java.io.PrintWriter#println(boolean)
	 */
	public void println(boolean x) {
		printer.println(x);
	}

	/**
	 * @param x
	 * @see java.io.PrintWriter#println(char)
	 */
	public void println(char x) {
		printer.println(x);
	}

	/**
	 * @param x
	 * @see java.io.PrintWriter#println(int)
	 */
	public void println(int x) {
		printer.println(x);
	}

	/**
	 * @param x
	 * @see java.io.PrintWriter#println(long)
	 */
	public void println(long x) {
		printer.println(x);
	}

	/**
	 * @param x
	 * @see java.io.PrintWriter#println(float)
	 */
	public void println(float x) {
		printer.println(x);
	}

	/**
	 * @param x
	 * @see java.io.PrintWriter#println(double)
	 */
	public void println(double x) {
		printer.println(x);
	}

	/**
	 * @param x
	 * @see java.io.PrintWriter#println(char[])
	 */
	public void println(char[] x) {
		printer.println(x);
	}

	/**
	 * @param x
	 * @see java.io.PrintWriter#println(java.lang.String)
	 */
	public void println(String x) {
		printer.println(x);
	}

	/**
	 * @param x
	 * @see java.io.PrintWriter#println(java.lang.Object)
	 */
	public void println(Object x) {
		printer.println(x);
	}

	/**
	 * @param format
	 * @param args
	 * @return
	 * @see java.io.PrintWriter#printf(java.lang.String, java.lang.Object[])
	 */
	public PrintWriter printf(String format, Object... args) {
		return printer.printf(format, args);
	}

	/**
	 * @param l
	 * @param format
	 * @param args
	 * @return
	 * @see java.io.PrintWriter#printf(java.util.Locale, java.lang.String, java.lang.Object[])
	 */
	public PrintWriter printf(Locale l, String format, Object... args) {
		return printer.printf(l, format, args);
	}
	
	public void close(){
		printer.close();
	}
}
